package cn.chencaiju.day02;

public class ArrayTest1 {
	public static void main(String[] args) {
		int[]	numbers1={2,8,10,12,33};
		int[]	numbers2={2,4,3,9,10};
		System.out.println(isSorted(numbers1));
		System.out.println(isSorted(numbers2));
	}
	public static boolean isSorted(int[] numbers) {
		boolean flag=true;
		for(int i=0;i<numbers.length-1;i++) {
			if(numbers[i]>numbers[i+1]) {
				flag=false;
				break;
			}
		}
		return flag;
	}
}
